<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTagCountsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('tag_counts', function (Blueprint $table) {
            $table->integer('tag_id')->comment('标签ID');
            $table->integer('click_count')->comment('历史点击量')->default(0);
            $table->integer('today_click_count')->comment('今日点击量')->default(0);
            $table->integer('content_count')->comment('包含内容量')->default(0);
            $table->integer('today_content_count')->comment('今日新增内容量')->default(0);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('tag_counts');
    }
}
